package com.tom.architect.day20.simple2;

/**
 * Added by Tom on 2023/12/27.
 */
public class Buttons {
    LeftCommand leftCommand;
    RightCommand rightCommand;

    public void setLeftCommand(LeftCommand leftCommand) {
        this.leftCommand = leftCommand;
    }
    public void setRightCommand(RightCommand rightCommand) {
        this.rightCommand = rightCommand;
    }

    public void toLeft() {
        leftCommand.execute();
    }
    public void toRight() {
        rightCommand.execute();
    }
}
